This invention relates to echo cancellers for telephones and conferencing terminals and more particularly to a method of controlling echo cancellation in a double talk environment.
In a telephone system it is known that incoming signals at the receiver of the terminal are frequently detected by the same terminal""s microphone and, if not cancelled, the signal are re-transmitted on the transmit path to a far-end user. Such signals are known as echo signals and can be extremely annoying to telephone users.
Known echo cancellation processes rely on a process involving a Normalized Least-Mean Square (NLMS) algorithm. This algorithm is effective against echo signals that occur when the near-end user is not speaking. There are, of course occasions when the near-end user will choose to talk at the same time as the far-end user. This situation wherein the parties on opposite ends of the telephone line are talking at the same time is known as double-talk. During double-talk, the aforementioned NLMS algorithm tends to become unstable. In order to overcome this instability the known echo canceller products stop or at least slow down the adaptation process as soon as a double-talk condition is detected. However, this scheme cannot prevent the adaptive weights from diverging in the time interval immediately before the double-talk condition has been detected. In a situation where the double-talk is so weak that the double-talk detector cannot detect it, the divergence of the NLMS algorithm becomes even more serious. Also, if the echo path changes during the double talk condition (which is often the case for the acoustic hands free telephone), the NLMS algorithm cannot make the necessary adjustment because the adaptation is frozen.
As previously discussed an echo in a telephone environment is the phenomenon in which a delayed and distorted version of an original signal is reflected back to the source. In the telephone system, this echo causes impairment on the fidelity of the speech signals and is often detrimental to the users. The purpose of the echo canceller is to estimate the echo path relative to the reference signal, reproduce the echo replica and subtract it from the input signal (see FIG. 1).
Currently, the most commonly used echo cancellation algorithm is the NLMS algorithm, which is described as follows: Let r(n) be the far-end speech and s(n) be the near-end speech at the microphone input. The echo signal se (n) can be modeled as:
se(n)=h(n)*r(n)xe2x80x83xe2x80x83(1)
where h(n) is the unknown echo path, * is the linear convolution operator.
The microphone input signal is
sin(n)=se(n)+s(n)+v(n)xe2x80x83xe2x80x83(2)
where v(n) is the background noise. To eliminate the echo signal se(n), the typical NLMS algorithm first estimates the echo path ĥ(n) with the reference signal r(n) and sin(n), and subtracts the echo replica ĥ(n)*r(n) from sin(n) to cancel the echo. With the NLMS algorithm it is possible to estimate ĥ(n) recursively such that at time m:                                                         h              ^                        ⁡                          (              n              )                                =                                                    h                ^                            ⁡                              (                n                )                                      +                                          μ                ⁢                                  xe2x80x83                                ⁢                                  e                  ⁡                                      (                    m                    )                                                  ⁢                                  r                  ⁡                                      (                                          m                      -                      n                                        )                                                                              E                r                                                    ,                  n          =          0                ,        1        ,        …        ⁢                  xe2x80x83                ,                  N          -          1                                    (        3        )            
where N is the length of ĥ(n), and 0 less than xcexc less than 2 is the step size which controls the convergence rate of the NLMS algorithm and its final residual error:
e(n)=sin(n)xe2x88x92h(n)*r(n)
Er is the energy of the reference signal:                               E          r                =                              ∑                          n              =              0                                      N              -              1                                ⁢                      xe2x80x83                    ⁢                                    r              2                        ⁡                          (                              m                -                n                            )                                                          (        4        )            
The advantages of the NLMS algorithm are that it is simple and easily implemented. When s(n) is absent, ĥ(n) converges to the true echo path h(n). However, when s(n) is present, i.e., when a double-talk situation occurs, the NLMS algorithm will become unstable and quickly diverge from its original state.
A new double-talk insensitive algorithm known herein as a double-talk normalized least mean square (DNLMS) algorithm is developed in this invention. During a double-talk condition, the DNLMS algorithm can not only stabilize its weights but also track echo path variations.
According to this invention, the NLMS algorithm is modified so that it will be stabilized during the double-talk environment. The new DNLMS algorithm is one in which the convergence rate xcexc is adaptively adjusted based on the double-talk condition, i.e., the power difference between sin(n) and r(n). Unlike most telephone echo cancellers where a double-talk detector is added and the adaptation is stopped as soon as a double-talk is detected, the DNLMS algorithm continues to track the echo path change during double-talk, and its cost to implement is even lower than a simple double-talk detector.
Therefore in accordance with a first aspect of the present invention there is provided in a telephone system having a receive path for receiving signals from a far end user and a transmit path for transmitting near end signals to a far end user, a method of controlling an acoustical echo canceller to cancel echo components based on the far end signal from the near end signal in a double talk condition, the method comprising: generating a replica echo signal based on the far end signal and an estimated echo path length; and controllably canceling the replica echo signal from the near end signal using an adaptively adjusted convergence rate.
In accordance with a further aspect of the present invention there is provided a method of controlling an acoustical echo canceller in a telephone system to cancel echo signals from near end signals in a double talk condition, the method comprising the steps of: measuring the relative strengths of the echo signal and the near end signal; canceling the echo signal by controlling convergence rate; and adaptively adjusting the convergence rate based on the relative strengths of said echo signals and said near end signals.
In accordance with a still further aspect of the present invention there is provided in a telephone network having a receive path for receiving signals from a far end user and a transmit path for transmitting near end signals to a far end user, an acoustical echo canceller for canceling echo components of the far end signal from the near end signal in a double talk condition, the echo canceller comprising: means to calculate the relative strengths of the echo components and the near end signal; convergence means to converge the echo components; and means to adaptively adjust the convergence rate based on the relative strengths of the echo components and the near end signal.